package com.bilibili.entity;

import com.fasterxml.jackson.databind.ObjectMapper;

public class CommenResult {
	private int code;
	private String message;
	private Object data;
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	public CommenResult(int code, String message, Object data) {
		super();
		this.code = code;
		this.message = message;
		this.data = data;
	}
	public CommenResult() {
		super();
	}
	public String toJOSNString(){
		ObjectMapper om = new ObjectMapper();
		try {
			return om.writeValueAsString(this);
		} catch (Exception e) {
			// TODO: handle exception
		}
		return null;
		
		
	}
}
